# name : hash: merge using set (do until)
# key : hash_merge_set_until
# contributor: Shuguang Sun
# --
data ${1:match};
  set ${2:small} point = _n_; * get key/data attributes for parameter type matching;
* set small (obs = 1); * this will work, too!;
* if 0 then set small; * and so will this!;
* set small (obs = 0); * but for some reason, this will not;

  dcl hash ${3:hh} (dataset: 'work.$2', hashexp: 10);
  $3.DefineKey( 'key' ); ** default to keep the first obs in the key, add();
  $3.DefineData( 's_sat' );
  $3.DefineDone();

  do until ( eof2 );
    set ${4:large} end = eof2;
    if $3.find() = 0 then output;
    end;
  stop;
run;